home *** CD-ROM | disk | FTP | other *** search
/ Chip 2006 July / CHIP 2006-07.2.iso / program / web_gelistirme / easyphp1-7_setup.exe / {app} / phpmyadmin / scripts / create-release.sh < prev    next >
Encoding:
Linux/UNIX/POSIX Shell Script  |  2003-07-27  |  4.7 KB  |  175 lines

  1. #!/bin/sh
  2. #
  3. # $Id: create-release.sh,v 1.32 2003/07/27 11:43:10 lem9 Exp $
  4. #
  5. # 2003-06-22, robbat2@users.sourceforge.net:
  6. # - Moved to using updatedocs.sh for updating documentation
  7. # - Make tarring faster by re-arranging ops
  8. #
  9. # 2003-01-17, rabus@users.sourceforge.net:
  10. # - Changed the CVS hostname to cvs1 because cvs1.sourceforge.net is now blocked
  11. #   for the SF shell servers, too. Note: The script now works on the SF shell
  12. #   servers ONLY!
  13. #
  14. # 2002-11-22, rabus@users.sourceforge.net:
  15. # - changed the CVS server dns to cvs1.sourceforge.net
  16. #   (cvs.phpmyadmin.sourceforge.net does not work at the SF shell anymore).
  17. #
  18. # 2002-10-03, rabus@users.sourceforge.net:
  19. # - more detailed instructions
  20. #
  21. # 2002-09-08, robbat2@users.sourceforge.net:
  22. # - Tweaked final instruction list
  23. #
  24. # 2002-06-17, lem9@users.sourceforge.net:
  25. # - I option to tar for bzip2 is deprecated, use j
  26. #
  27. # 2002-27-04, loic@phpmyadmin.net:
  28. # - added the cvs branch feature
  29. #
  30. # 2001-08-08, swix@users.sourceforge.net:
  31. # - created script
  32. # - added release todo list
  33. #
  34.  
  35.  
  36. if [ $# == 0 ]
  37. then
  38.   echo "Usage: create-release.sh version from_branch"
  39.   echo "  (no spaces allowed!)"
  40.   echo ""
  41.   echo "Example: create-release.sh 2.2.7-rc1 v2_2_7-branch"
  42.   exit 65
  43. fi
  44.  
  45. if [ $# == 1 ]
  46. then
  47.   branch=''
  48. fi
  49. if [ $# == 2 ]
  50. then
  51.   branch="-r $2"
  52. fi
  53.  
  54.  
  55. cat <<END
  56.  
  57. Please ensure you have:
  58.   1. incremented rc count or version in CVS :
  59.      - in libraries/defines_php.lib.php3 the line
  60.           " define('PMA_VERSION', '$1'); "
  61.      - in Documentation.html the 2 lines
  62.           " <title>phpMyAdmin $1 - Documentation</title> "
  63.           " <h1>phpMyAdmin $1 Documentation</h1> "
  64.      - in translators.html
  65.      - in README
  66.   2. built the new "Documentation.txt" version using:
  67.        "./scripts/updatedocs.sh"
  68.   3. synchronized the language files:
  69.        cd lang
  70.        ./sync_lang.sh
  71.      and checked all language files are valid (use
  72.      the "./scripts/check_lang.php3" script to do it).
  73.  
  74. Continue (y/n)?
  75. END
  76. printf "\a"
  77. read do_release
  78.  
  79. if [ "$do_release" != 'y' ]; then
  80.   exit
  81. fi
  82.  
  83. # Move old cvs dir
  84. if [ -e cvs ];
  85. then
  86.     mv cvs cvs-`date +%s`
  87. fi
  88. # Do CVS checkout
  89. mkdir cvs
  90. cd cvs
  91. echo "Press [ENTER]!"
  92. cvs -d:pserver:anonymous@cvs1:/cvsroot/phpmyadmin login
  93. if [ $? -ne 0 ] ; then
  94.     echo "CVS login failed, bailing out"
  95.     exit 1
  96. fi
  97. cvs -z3 -d:pserver:anonymous@cvs1:/cvsroot/phpmyadmin co -P $branch phpMyAdmin
  98. if [ $? -ne 0 ] ; then
  99.     echo "CVS checkout failed, bailing out"
  100.     exit 2
  101. fi
  102.  
  103. # Cleanup release dir
  104. LC_ALL=C date -u > phpMyAdmin/RELEASE-DATE-$1
  105. find phpMyAdmin \( -name .cvsignore -o -name CVS \) -print0 | xargs -0 rm -rf 
  106. find phpMyAdmin -type d -print0 | xargs -0 chmod 755
  107. find phpMyAdmin -type f -print0 | xargs -0 chmod 644
  108. find phpMyAdmin \( -name '*.sh' -o -name '*.pl' \) -print0 | xargs -0 chmod 755
  109. mv phpMyAdmin phpMyAdmin-$1
  110.  
  111. # Roll up '.php3' release
  112. zip -9 -r phpMyAdmin-$1-php3.zip phpMyAdmin-$1
  113. tar cvf phpMyAdmin-$1-php3.tar phpMyAdmin-$1
  114. bzip2 -9kv phpMyAdmin-$1-php3.tar
  115. gzip -9v phpMyAdmin-$1-php3.tar
  116.  
  117. # Setup for '.php' release
  118. cd phpMyAdmin-$1
  119. ./scripts/extchg.sh php3 php
  120. cd ..
  121. # Roll up '.php' release
  122. zip -9 -r phpMyAdmin-$1-php.zip phpMyAdmin-$1
  123. tar cvf phpMyAdmin-$1-php.tar phpMyAdmin-$1
  124. bzip2 -9kv phpMyAdmin-$1-php.tar
  125. gzip -9v phpMyAdmin-$1-php.tar
  126.  
  127. echo ""
  128. echo ""
  129. echo ""
  130. echo "Files:"
  131. echo "------"
  132.  
  133. ls -la *.gz *.zip *.bz2
  134. cd ..
  135. find cvs -type d -print0 | xargs -0 chmod 775
  136. find cvs -type f -print0 | xargs -0 chmod 664
  137.  
  138.  
  139. cat <<END
  140.  
  141.  
  142. Todo now:
  143. ---------
  144.  1. tag the cvs tree with the new revision number for a plain release or a
  145.     release candidate
  146.  2. upload the files to SF:
  147.         ftp upload.sourceforge.net
  148.         cd incoming
  149.         binary
  150.         mput cvs/*.gz *.zip *.bz2
  151.  3. add files to SF files page (cut and paste changelog since last release)
  152.  4. add SF news item to phpMyAdmin project
  153.  5. update the download page: /home/groups/p/ph/phpmyadmin/htdocs
  154.  6. announce release on freshmeat (http://freshmeat.net/projects/phpmyadmin/)
  155.  7. send a short mail (with list of major changes) to
  156.         phpmyadmin-devel@lists.sourceforge.net
  157.         phpmyadmin-news@lists.sourceforge.net
  158.         phpmyadmin-users@lists.sourceforge.net
  159.  8. increment rc count or version in CVS :
  160.         - in libraries/defines_php.lib.php3 the line
  161.               " define('PHPMYADMIN_VERSION', '2.2.2-rc1'); "
  162.         - in Documentation.html the 2 lines
  163.               " <title>phpMyAdmin 2.2.2-rc1 - Documentation</title> "
  164.               " <h1>phpMyAdmin 2.2.2-rc1 Documentation</h1> "
  165.         - in translators.html
  166.  9. the end :-)
  167.  
  168. END
  169.  
  170. # Removed due to not needed thanks to clever scripting by Robbat2
  171. # 9. update the demo subdirectory:
  172. #        - in htdocs, cvs update phpMyAdmin
  173. #        - and don't forget to give write rights for the updated scripts to the
  174. #          whole group
  175.